import { createStore } from 'vuex'
import axios from "axios"
export default createStore({
  state: {
    list:[]
  },
  mutations: {
    GET_LIST(state,data){
      state.list=data
    }
  },
  actions: {
    GetList(context){
      axios.get("/api/list").then(res=>{
        console.log(res.data.data)
        context.commit("GET_LIST",res.data.data)
      })
    }
    

  },
  modules: {
  }
})
